package com.springboot.test.web.manage;

import com.springboot.test.common.response.Response;
import com.springboot.test.entity.NoticeEntity;
import com.springboot.test.service.NoticeService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("manage/notice")
public class ManageNoticeController {

    @Resource
    private NoticeService noticeService;

    @PostMapping("add")
    public Response<Boolean> addNotice(@RequestBody NoticeEntity noticeEntity){
        return Response.success(noticeService.addNotice(noticeEntity));
    }

}
